import * as constType from './constants'

const initalState = {
  counter:200
}
function reducer(state = initalState, action){
  switch(action.type){
    case constType.INCREMENT:
      return {counter: state.counter + action.counter}
    case constType.DECREMENT:
      return {counter: state.counter - action.counter}
    default:
      return state
  }
}

export default reducer